package com.jianying.mapper;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.jianying.base.BaseMapper;
import com.jianying.dataSource.TargetDataSource;
import com.jianying.domain.Notice;

@Repository("noticeMapper")
public class NoticeMapper extends BaseMapper {
	
	private final static String NAME_SPACE = "com.jianying.mapper.NoticeMapper.";

	@TargetDataSource(name="ds1")
	public void insert(Notice entity) {
		getSqlSessionTemplate().insert(NAME_SPACE + "insert", entity);
	}

	public List<Notice> all(Integer tenantId){
		return getSqlSessionTemplate().selectList(NAME_SPACE + "all", tenantId);
	}
	
}
